package com.asion.qkan.ui.contract;

import com.asion.qkan.entry.AllContentBean;
import com.asion.qkan.entry.HomeBean;
import com.asion.qkan.ui.model.BaseModel;
import com.asion.qkan.ui.presenter.BasePresenter;
import com.asion.qkan.ui.view.BaseView;

/**
 * Created by asion on 16-10-12.
 */

public interface HomeContract {

    interface Model extends BaseModel{
        //定义model中的需要方法 以接口形式:网址和回调接口
        void getHomeDatas(String category,String id,OnHomeGetListener onHomeGetListener);

    }

    interface View extends BaseView<HomeBean>{
        //定义view中需要的接口
        //baseView<T> 可指定你要用的Entry返回数据
    }

    abstract static class Presenter extends BasePresenter<View,Model>{
        //定义presenter需要的方法
        public abstract void setHomeDatas(String category,String id);
    }
    interface OnHomeGetListener {
        //写实体类
        void onHomeSuccess(HomeBean homeBean);
        void onHomeError(Throwable t);
    }


}
